#include<stdio.h>
#include<time.h>
#include<stdlib.h>
#define N 30000
int main()
{
    float x,y;
    int c=0,d=0;
    randomize();
    while(c++<=N);{
        x=random();
        y=random();
        if(x*x+y*y<=10000)
        d++;

    }
    printf(" pi=%f\n",4*d/N);

}
